1. Field of the Invention
The invention relates to a method of coding video pictures, comprising the steps of transforming picture blocks of a video picture into transform coefficients, and encoding the difference between the transform coefficients of each transformed picture block and corresponding transform coefficients of a prediction block which is obtained by applying motion estimation to a previously encoded picture. The invention also relates to an arrangement for carrying out the method.
2. Description of the Related Art
Video encoders operating in accordance with international coding standards such as MPEG and H.261 are hybrid encoders, in which transform coding and predictive coding are combined. The predictive coding, which includes motion estimation and compensation, is usually carried out in the pixel domain, and the transform coding (DCT) is applied to the predictively coded signal. In such encoders, an inverse DCT is required in the prediction loop.
Nowadays, research effort is being spent on carrying out the predictive coding in the transform domain. In such an embodiment of the hybrid encoder, the picture is transformed first and the predictive coding is then applied to the transform coefficients. The inverse DCT can now be dispensed with. A schematic diagram of such a hybrid video encoder has been published by the University of Maryland on the Internet (http://dspserv.eng.umd.edu:80.. xcx9ckoc /project/Video_Coding.html).
A drawback of the prior-art hybrid video encoder is that motion estimation and compensation in the transform domain are more complex than in the pixel domain because the calculation of a prediction block involves a large number of matrix multiplications. In particular, motion estimation is a severe problem. Motion estimation comprises the steps of calculating a plurality of candidate prediction blocks, comparing each candidate prediction block with the transformed picture block, and selecting one of the candidate prediction blocks to be the prediction block. With each plurality of candidate prediction blocks, said large number of calculations is involved.
It is an object of the invention to provide a method of video encoding, alleviating the above mentioned drawbacks.
To achieve these and other objects, the method in accordance with the invention is characterized in that the steps of calculating a candidate prediction block and comparing the candidate prediction block with the transformed picture block, are carried out for a subset of the transform coefficients of said candidate prediction block and transformed picture block.
The invention is based on the recognition that the majority of bits for encoding a picture block are usually spent on a few transform coefficients and that it is beneficial to restrict the search for the most-resembling prediction block to these coefficients. The number of multiplications is considerably reduced thereby, in particular, in coding standards such as MPEG, where motion compensation is applied to 16*16 macroblocks comprising four 8*8 luminance blocks. Note that the eventually selected prediction block for the motion compensation will still be calculated completely. Picture quality is thus not affected.
Advantageously, the subset of transform coefficients comprises the DC coefficient and a predetermined number of adjacent AC coefficients, for example, the coefficients constituting a 2*2 or 3*3 submatrix in the upper left corner of an 8*8 block. The submatrix may extend in the horizontal direction (for example, 2*3 or 2*4) because most of the motion in normal video scenes is found to be horizontal. The number of multiplications is even further reduced when only coefficients of a single row or single column are calculated.
In a preferred embodiment, the coefficients are chosen in dependence upon the represented by the candidate prediction block and expressed by its associated candidate motion vector. If the candidate motion vector represents horizontal motion, a submatrix is chosen which substantially extends in the horizontal direction. If the candidate motion vector represents vertical motion, the submatrix chosen substantially extends in the vertical direction.